<template>
	<view>
		<view class=" u-p-r-30 u-p-l-30 u-m-t-20" >
			<view class="title" v-html="taskInfo.name+'服务卡'"></view>
		</view>
		<view class=" u-p-r-30 u-p-l-30 u-m-t-20" >
			<u-table border-color="#000000" font-size="22">
				<u-tr>
					<u-td><span style="color: #000000;font-weight: 600;">客户名称</span></u-td>
					<u-td v-html="taskInfo.outCustomerName"></u-td>
				</u-tr>
				<u-tr>
					<u-td><span style="color: #000000;font-weight: 600;">客户单号</span></u-td>
					<u-td v-if="taskInfo.customerNumber != '' && taskInfo.customerNumber != null" v-html="taskInfo.customerNumber"></u-td>
					<u-td v-else>无</u-td>
				</u-tr>
				<u-tr>
					<u-td><span style="color: #000000;font-weight: 600;">项目部</span></u-td>
					<u-td v-html="taskInfo.operateName"></u-td>
				</u-tr>
				<u-tr>
					<u-td><span style="color: #000000;font-weight: 600;">作业日期</span></u-td>
					<u-td v-html="taskInfo.v1"></u-td>
					<u-td><span style="color: #000000;font-weight: 600;">作业单号</span></u-td>
					<u-td v-html="taskInfo.orderNumber"></u-td>
				</u-tr>
				<u-tr>
					<u-td><span style="color: #000000;font-weight: 600;">作业类型</span></u-td>
					<u-td v-html="taskInfo.taskWork"></u-td>
					<u-td><span style="color: #000000;font-weight: 600;">类别</span></u-td>
					<u-td v-if="taskInfo.v8 != '' && taskInfo.v8 != null" v-html="taskInfo.v8"></u-td>
					<u-td v-else>无</u-td>
					<u-td><span style="color: #000000;font-weight: 600;">核算方式</span></u-td>
					<u-td v-html="taskInfo.settlementMode"></u-td>
				</u-tr>
				<u-tr>
					<u-td><span style="color: #000000;font-weight: 600;">开始时间</span></u-td>
					<u-td><span style="color: #000000;font-weight: 600;">结束时间</span></u-td>
					<u-td><span style="color: #000000;font-weight: 600;">人数</span></u-td>
					<u-td><span style="color: #000000;font-weight: 600;" v-html="taskInfo.settlementMode"></span></u-td>
					<u-td><span style="color: #000000;font-weight: 600;">累计工时</span></u-td>
					<u-td><span style="color: #000000;font-weight: 600;">创建时间</span></u-td>
					<u-td><span style="color: #000000;font-weight: 600;">创建人</span></u-td>
				</u-tr>
				<u-tr>
					<u-td v-html="taskInfo.createTimes"></u-td>
					<u-td v-html="taskInfo.endTime"></u-td>
					<u-td v-html="taskInfo.peoples"></u-td>
					<u-td v-if="taskInfo.settlementMode == '体积'" v-html="taskInfo.volume"></u-td>
					<u-td v-if="taskInfo.settlementMode == '重量'" v-html="taskInfo.weights"></u-td>
					<u-td v-if="taskInfo.settlementMode == '数量'" v-html="taskInfo.nums"></u-td>
					<u-td v-if="taskInfo.settlementMode == '工时'" v-html="taskInfo.hours"></u-td>
					<u-td v-html="taskInfo.hours"></u-td>
					<u-td v-html="taskInfo.v2"></u-td>
					<u-td v-html="taskInfo.v3"></u-td>
				</u-tr>
			</u-table>
		</view>
		<view>
			<u-toast ref="uToast" />
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				taskInfo: {},
			}
		},
		onLoad(open) {
			this.$http.post('/rest/task/getById',{
			},{
				params: {id:open.taskid},
				header: {
					'Authorization' :uni.getStorageSync('token'),
				}
			}).then(res => {
				this.taskInfo = res.data.data
			})
			
			setTimeout(() => {
				this.taskInfo.createTimes = this.taskInfo.createTimes.substring(11,16)
				this.taskInfo.endTime = this.taskInfo.endTime.substring(11,16)
				this.taskInfo.v2 = this.taskInfo.v2.substring(11,16)
			}, 1000)
		},
		methods: {
		},
	}
</script>
<style lang="scss">
	.title{
		font-size: 36rpx;
	}
</style>
